home *** CD-ROM | disk | FTP | other *** search
- #ifndef mappingDefined
- #define mappingDefined
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
- #define ff(x) ((Fixed)(x) << 16)
-
- typedef struct {
- Fixed map[3][2];
- } mapping;
-
- void MapXY(const mapping* map, Fixed* x, Fixed* y);
- Point* MapQDPoint(const mapping* map, Point* p);
- Rect* MapRectangle(const mapping* map, Rect* r);
- RgnHandle MapRectToRgn(const mapping* map, const Rect* r, RgnHandle rgn);
-
- mapping* SetIdentityMapping(mapping* map);
- mapping* OffsetMapping(mapping* map, Fixed offsetX, Fixed offsetY);
- mapping* ScaleMapping(mapping* map, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY);
- mapping* RotateMapping(mapping* map, Fixed angle, Fixed aboutX, Fixed aboutY);
- mapping* InvertMapping(mapping* map);
- mapping* ConcateMapping(mapping* dst, const mapping* map);
- Boolean IdentityMapping(const mapping* map);
-
- #endif
-